package com.ubxtech.nacos.config;

import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
import com.alibaba.cloud.nacos.NacosServiceManager;
import com.alibaba.nacos.api.naming.NamingService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Victor.Xiao
 * @since 2023-12-11 10:58
 **/
@Configuration
public class CustomNamingConfig {

    @Bean(value = "customNamingService")
    public NamingService customNamingService(NacosServiceManager nacosServiceManager, NacosDiscoveryProperties nacosDiscoveryProperties) {
        return nacosServiceManager.getNamingService();
    }
}
